Transactional Virtual Memory with Fine-grained Range Lock Support
نویسندگان
چکیده
Lightweighted Recoverable Virtual Memory (RVM) [5] is a software mechanism to support persistent virtual memory regions in the face of system crashes. Regions maintained by RVM are accessed in transactions. RVM can undo all the memory changes in aborted transactions, while committed transactions have their changes written to secondary storages. Therefore transactional atomicity and durability are guaranteed. RVM is implemented as a programming library that can be linked to application programs. Using RVM, applications which must maintain persistent data structures and survive system crashes can be easily implemented with less efforts. However, RVM requires that programmers use thread locks themselves to synchronize among concurrent transactions. That is, RVM does not support serialization, which is the ’I’ or Isolation property in ACID [3]. To reduce programers’ burdens of implementing their own serialization mechanisms, we add serialization support to RVM, thus providing the full ACID semantics of transactions to virtual memory. Our transactional virtual memory (TVM) aims at ease of use by programmers, efficiency, and portability. It allows high concurrency among transactions with low overhead. We use strict two phase locking protocol for serialization. As RVM, TVM is also implemented as a programming library. TVM keeps RVM’s interface and adds three new library calls so that existing RVM applications can be linked to TVM without any change. The three new calls are to request a read, write, or intension range lock on a memory range in RVM maintained regions. A lot of popular synchronization programming styles are easily realized by these range lock calls. We support fine-grained byte range locks. All the range lock information of transactions is recorded by TVM. A thread is blocked when it requests a range lock conflicting with other transactions and is woken up after those transactions end. Two range lock algorithms are put forward. The basic algorithm is easy to implement and efficient when small number of locks are used concurrently. The advanced algorithm uses two tree structures to help locate the conflicting range locks directly and therefore offers better performance when the number of locks is large. Both approaches ensure forward progress by avoiding live locks and by providing a deadlock detection mechanism. Furthermore, range locks are implemented using common synchronization primitives supported by most thread packages. This is preferred to an implemetation within a specific thread package for portability reasons. The remaining of the paper is organized as follows. We begin with a clear description of the existing RVM mechanism. Then we discuss our major design decisions aiming at ease of use, efficiency, and portability. Section 3 elaborates detailed design and implementation of the two range lock algorithms. Then section 4 decribes our deadlock detection mechanism. An evaluation of TVM is presented in Section 5. In Section 6, we describe the course material covered in our project. And finally, section 7 concludes our discussion.
منابع مشابه
Fast Multi-Level Locks for Java A Preliminary Performance Evaluation
Atomic sections guarantee atomic and isolated execution of a block of code. Transactional Memory can be used to implement them but suffers from the inability to support system calls and has high overhead. Lock inference is a pessimistic alternative that infers the locks necessary to prevent thread interference. Our research looks at lock inference techniques for Java programs. An important aspe...
متن کاملCombining Lock Inference with Lock-Based Software Transactional Memory
An atomic block is a language construct that simplifies the programming of critical sections. In the past, software transactional memory (STM) and lock inference have been used to implement atomic blocks. Both approaches have strengths and weaknesses. STM provides fine-grained locking but has high overheads due to logging and potential rollbacks. Lock inference is a static analysis that compute...
متن کاملTransactional Locking II
The transactional memory programming paradigm is gaining momentum as the approach of choice for replacing locks in concurrent programming. This paper introduces the transactional locking II (TL2) algorithm, a software transactional memory (STM) algorithm based on a combination of commit-time locking and a novel global version-clock based validation technique. TL2 improves on state-of-the-art ST...
متن کاملOn Closed Nesting in Distributed Transactional Memory
Distributed Software Transactional Memory (D-STM) is a recent but promising model for programming distributed systems. It aims to present programmers with a simple to use abstraction (transactions), while maintaining performance and scalability similar to distributed fine-grained locks. Any complications usually associated with such locks (i.e. distributed deadlock) are avoided. Building upon t...
متن کاملFiner-grained Locking in Concurrent Dynamic Planar Convex Hulls
The convex hull of a planar point set is the smallest convex polygon containing each point in the set. The dynamic convex hull problem concerns efficiently maintaining the convex hull of a set of points subject to additions and removals. One algorithm for this problem uses two external balanced binary search trees (BSTs) [16]. We present the first concurrent solution for this problem, which use...
متن کامل